Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  the  Addresses  in  My  Sent  Items  Folder  in  an  Excel  Spreadsheet  

 Content of List the Addresses in My Sent Items Folder in an Excel Spreadsheet.vbs
MD5 Hash: A88CDFDBC56B7E989A07088C3626EA59
Const olSentMail = 5

Set objDictionary = CreateObject("Scripting.Dictionary")
Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Add
Set objWorksheet = objWorkbook.Worksheets(1)

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objFolder = objNamespace.GetDefaultFolder(olSentMail)

Set colItems = objFolder.Items

For Each objItem in colItems
Set colRecipients = objItem.Recipients
For Each objRecipient in colRecipients
strAddress = objRecipient.Address
If Not objDictionary.Exists(strAddress) Then
objDictionary.Add strAddress, strAddress
End If
Next
Next

i = 1

For Each strKey in objDictionary.Keys
objWorksheet.Cells(i, 1) = strKey
i = i + 1
Next



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a